<?php
function clog($msg, $tag = 'p')
{
    // echo $msg, "\n";
    if (PHP_SAPI === 'cli') {
        echo "[$tag]: " . $msg . "\n";
    } else {
        echo "<$tag>", $msg, "</$tag>";
    }
}

function newline()
{
    echo "<br/>";
}

function clogList($arr)
{
    echo "<ol>";
    foreach ($arr as $val) {
        clog($val, 'li');
    }
    echo "</ol>";
}

function title($ttl, $level = 2)
{
    $tag = "h$level";
    clog($ttl, $tag);
}

function comment($con)
{
    clog(':: ' . $con, tag: 'blockquote');
}

?>